<div id="jquery-wrapped-fine-uploader"></div>
<div id="uploaded_image"></div>

<script type='text/javascript'>
jQuery("#jquery-wrapped-fine-uploader").fineUploader({
	debug: true,
	request: {
		endpoint: 'fineUploader/uploadImage.php'
	},
	multiple: false,
	validation: {
		allowedExtensions: ['jpeg', 'jpg', 'gif', 'png']
	}
}).on('complete', function(event, id, fileName, responseJSON) {

	if (responseJSON.success) {
		jQuery(this).append('<img src="upload/face.png" alt="' + fileName + '">');
		window.location = 'index.html#/detection/' + responseJSON.userId;
	}
});
</script>